package demo1;

//牛客网:次经一役小红所向无敌

import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        long a = in.nextInt();
        long h = in.nextInt();
        long b = in.nextInt();
        long k = in.nextInt();
        long sum = 0;
        while(h>0 && k>0) {
            sum += a;
            sum += b;
            h-=b;
            k-=a;
        }
        if(h>0 && k<=0) {
            sum += 10*a;
        }
        if(k>0 && h<=0) {
            sum += 10*b;
        }
        System.out.println(sum);
    }
}